import request from '@/utils/request.js';

// 获取医院详情信息接口
const HOSPITALDETAIL_URL = '/hosp/hospital';

// 获取医院科室列表接口数据
const HOSPITALDEPARTMENTS_URL = '/hosp/hospital/department';

//获取某一个医院的某一个科室预约挂号数据
const HOSPITALWORK_URL = '/hosp/hospital/auth/getBookingScheduleRule/';

//获取医院某一个科室某一天相应医生排班的数据
const HOSPITALDOCTOR_URL = '/hosp/hospital/auth/findScheduleList/';

//获取某一个账号下就诊人的信息
const GETUSER_URL = '/user/patient/auth/findAll';
//获取挂号医生的信息
const GETDOCTOR_URL = '/hosp/hospital/getSchedule/'


// 导出接口
// 获取医院详情信息接口
export const reqHospitalDetail = (hoscode) => request.get(
    `${HOSPITALDETAIL_URL}/${hoscode}`
)
// 获取医院科室列表接口数据
export const reqHospitalDepartment = (hoscode) => request.get(
    `${HOSPITALDEPARTMENTS_URL}/${hoscode}`
)
// 获取某一个医院的某一个科室预约挂号数据
export const reqHospitalWork = (page, limit, hoscode, depcode) => {
    return request.get(
        HOSPITALWORK_URL + `${page}/${limit}/${hoscode}/${depcode}`
    )
}
// 获取医院某一个科室某一天相应医生排班的数据
export const reqHospitalDoctor = (hoscode, depcode, workData) => {
    return request.get(
        HOSPITALDOCTOR_URL + `${hoscode}/${depcode}/${workData}`
    )
}
// 获取某一个账号下就诊人的信息
export const reqGetUser = ( ) => {
    return request.get(GETUSER_URL)
}
// 获取挂号医生的信息
export const reqGetDoctor = (scheduleId) => {
    return request.get(
        GETDOCTOR_URL + scheduleId
    )
}